//
//  ELUserDefault.h
//  jobClient
//
//  Created by 一览ios on 16/4/13.
//  Copyright © 2016年 YL1001. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ELPlayHistoryModel.h"

#define kLocationCityName @"location_city_name"

#define kUserDefaults(object,key) [[NSUserDefaults standardUserDefaults] setValue:object forKey:key] // 存
#define kUserSynchronize [[NSUserDefaults standardUserDefaults] synchronize] // 存同步
#define getUserDefaults(key) [[NSUserDefaults standardUserDefaults] objectForKey:key] // 取


#define kAllNums [NSString stringWithFormat:@"%@isAllNums",[Manager getUserInfo].userId_]//所有的消息小红点数
#define kAllCompanyNums [NSString stringWithFormat:@"%@isAllCompanyNums",[Manager getUserInfo].userId_]
#define kAllJobNums [NSString stringWithFormat:@"%@isAllJobNum",[Manager getUserInfo].userId_]

/** 极光IM消息未读数 */
#define kAllUnreadCount @"allUnreadCount"
#define kAllCompanyUnreadCount @"allCompanyUnreadCount"
#define kAllBrokerUnreadCount @"allBrokerUnreadCount"

// V7.0 是否显示第三方功能
#define kIsShowHiddenFunction @"isShowHiddenFunction"



#define kBrokerMessageBadgeNum [NSString stringWithFormat:@"%@isBrokerMessageBadgeNum",[Manager getUserInfo].userId_]       // 经纪人消息徽章数量

@interface ELUserDefault : NSObject
//保存用户登录状态
+(void)setUserLoginStatus:(BOOL)status;

//获取用户登录状态
+(BOOL)getUserLoginStatus;

//记录home时间戳
+(void)setHomeTimeUserDefault:(NSString *)time;

//获取home时间戳
+(NSString *)getHomeTimeUserDefault;

//设置三方登录是否完善信息
+(void)setPerfectInformation:(BOOL)showTip;

+(BOOL)getPerfectInfomation;

//社群头像是否弹框
+(void)setGroupHeadisPlay:(NSString *)time;

+(NSString *)getGroupHeadisPlay;

//是否显示新图标
+(void)setShowNewHead:(NSString *)time;

+(NSString *)getShowNewHead;

//公司地址
+ (void)setCompanyAddress:(NSString *)address;

+ (NSString *)getCompanyAddress;

//顾问端推荐理由
+ (void)setRecommendContent:(NSString *)content;

+ (NSString *)getRecommendContent;

//账户是否绑定手机
+ (void)setBindPhoneStatus:(BOOL)status;

+ (BOOL)getBindPhoneStatus;

//音频后台播放缓存信息
+(void)setkAudioBackPlayDic:(NSDictionary *)dic;
+(NSDictionary *)getkAudioBackPlayDic;

//消息搜索历史记录
+(void)setMessageSearchHistory:(NSMutableArray *)arr;
+(NSArray *)getMessageSearchHistory;
+(void)clearMessageSearchHistory;

//企业端消息搜索历史记录
+(void)setCompanyMessageSearchHistory:(NSMutableArray *)arr;
+(NSArray *)getCompanyMessageSearchHistory;
+(void)clearCompanyMessageSearchHistory;

//音频缓存记录上传时间
+(NSString *)getMediaCacheDate;
+(void)setMediaCacheDateWithStr:(NSString *)dateStr;

//音频显示底部播放器
+(BOOL)getBottomPlayerShowStatus;
+(void)setBottomPlayerShowStatus:(BOOL)show;

//音频播放时间缓存
+(CGFloat)getPlayerCacheTime;
+(void)setPlayerCacheTime:(CGFloat)time;

//社群弹窗的时间
+(NSString *)getGroupAlertTimeDateWithId:(NSString *)groupId;
+(void)setGroupAlertTimeDate:(NSString *)time withGroupId:(NSString *)groupId;

//音频播放记录存取
+(void)saveGroupPlayHistoryWithModel:(ELPlayHistoryModel *)model;
+(ELPlayHistoryModel *)getPlayHistoryModelWithArticleId:(NSString *)articleId;

//音频最后一条记录存取
+(ELPlayHistoryModel *)getPlayHistoryModelLast;
+(void)savePlayHistoryLastModel:(ELPlayHistoryModel *)model;

#pragma mark - 新版企业端绑定信息
+ (NSDictionary *)getBindNewSystemEnterpriseInfo;
+ (void)setBindNewSystemEnterpriseInfo:(NSDictionary *)infoDic;
+ (void)deleteBindNewSystemEnterpriseInfo;

#pragma mark - 企业消息删除列表
+(void)addCompanyDeleteListWithKey:(NSString *)key dateStr:(NSString *)dataStr;
+(NSDictionary *)getCompanyDeleteList;

@end
